import { createApp } from 'vue'
import '@/assets/styles/index.scss' // global css


import App from './App.vue'
import router from './router'
import store from "./store";

import ElementPlus from 'element-plus'
import locale from "element-plus/dist/locale/zh-cn.mjs" // 中文语言
import 'element-plus/dist/index.css'

// svg图标
import 'virtual:svg-icons-register'
import SvgIcon from '@/components/SvgIcon'
import elementIcons from '@/components/SvgIcon/svgicon'
// 注册指令
import plugins from './plugins' // plugins

const app = createApp(App)


app.use(router)
app.use(store)
app.use(plugins)
// app.use(infiniteScroll)
// 使用element-plus 并且设置全局的大小
app.use(ElementPlus, {
    locale: locale,
    // 支持 large、default、small
    size: 'default'
})
app.use(elementIcons)
app.component('svg-icon', SvgIcon)

app.mount('#app')

Array.prototype.remove = function(val) {
    let index = this.indexOf(val);
    if (index > -1) {
        this.splice(index, 1);
    }
};
